package com.probox.common.core.enums;

/**
 * 订单流程节点
 */
public enum OrderTimeStatusEnum {

    cancel(0,"取消订单"),
    submit(1,"提交订单"),
    pay(2,"付款成功"),
    send(3,"已发货"),
    receive(4,"已签收"),
    comment(5,"已评价")
    ;

    private OrderTimeStatusEnum(Integer k, String v) {
        this.setKey(k);
        this.setValue(v);
    }

    public static String getNameByKey(Integer key) {
        String rst = "";
        for(OrderTimeStatusEnum oe: OrderTimeStatusEnum.values()) {
            if (oe.getKey() == key) {
                rst = oe.getValue();
                break;
            }
        }
        return rst;
    }

    private Integer key;
    private String value;

    public Integer getKey() {
        return key;
    }
    public void setKey(Integer key) {
        this.key = key;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }

}
